home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / AMIREL.ZIP / BIOSDIAG.MAN < prev    next >
Text File  |  1989-08-07  |  30KB  |  1,152 lines

  1.  
  2.  
  3. 1.0 Power on self test functions
  4.  
  5.  
  6. On cold boot or hard reset AMI BIOS performs system diagnostics and
  7. initialization operations which can be broadly classified into the following :-
  8.  
  9.  
  10.         Processor register test
  11.     
  12.         ROM BIOS checksum check
  13.  
  14.         Keyboard controller test
  15.  
  16.         CMOS Shutdown register test
  17.  
  18.         Channel 2,1,0 timer test
  19.  
  20.         Memory refresh test
  21.  
  22.         Base 64KB RAM test
  23.  
  24.         CACHE memory test
  25.  
  26.         CMOS battery, options set, checksum check
  27.  
  28.         Display type verification
  29.  
  30.         Entering protected mode
  31.  
  32.         Address line test and memory size finding 
  33.  
  34.         Conventional and Extended memory test
  35.  
  36.         DMA controller test
  37.  
  38.         Keyboard test
  39.  
  40.         System configuration verification and setup
  41.  
  42.  
  43.  
  44.  
  45. 1.0.1 Processor register test..
  46.  
  47. Procedure..
  48.  
  49. All processor registers are loaded with values 05555h, 0aaaah, 0cccch,
  50. 0f0f0h and checked if they retain the values.
  51.  
  52. Possible errors..
  53.  
  54. error:  Registers do not retain the values
  55. Action: 5 short beeps in an infinite loop. System does not
  56.         proceed further.
  57.  
  58. 1.0.2. ROM BIOS Checksum check..
  59.  
  60. Procedure..
  61.  
  62. Word addition of the BIOS ROM starting at F000:8000h till F000:FFFEh is
  63. taken. The word addition (checksum)  should be 0.
  64.  
  65. Possible errors..
  66.  
  67. error:    Checksum is nonzero
  68. action:    9 short beeps in an infinite loop. System does not
  69.         proceed further.
  70.  
  71. 1.0.3. Keyboard controller test..
  72.  
  73. A keyboard controller BAT command is issued(command 0AAH) and the
  74. response is checked. Response should be 55H.
  75.  
  76. Possible errors..
  77.  
  78. error:    Return value <> 55H
  79. action:    6 short beeps issued in an infinite loop. System does
  80.         not proceed any further.
  81.  
  82. 1.0.4. CMOS Shutdown register test..
  83.  
  84. Hex value 55h is written into and read back from CMOS shutdown register
  85. 8fh. The value read back should be 55h. The same test is then performed
  86. with a hex value 0AAh.
  87.  
  88. Possible errors..
  89.  
  90. error:    Values read back not same as values written.
  91. action:    Error "CMOS INOPERATIONAL" is registered and the system
  92.         will stop after the display is initialized with the
  93.         above error displayed on the screen.
  94.  
  95.  
  96. 1.0.5. Channel 2,1,0 timer test..
  97.  
  98. A. Channel 2 timer test..
  99.  
  100. Procedure..
  101.  
  102. Channel 2 timer gate and speaker is disabled and the gate bit is verified to
  103. see if the gate is still disabled.
  104.  
  105. Channel 2 timer is programmed for 2 byte count. A test value of 55h is
  106. written to high byte and AAh to low byte of channel 2 timer. Since the
  107. timer gate is disabled it should retain these values.
  108.  
  109. Possible errors..
  110.  
  111. error:    channel 2 timer gate is still enabled
  112. action:    Register "CH-2 timer error" to be displayed before
  113.         system boot.
  114.  
  115. error:    The channel 2 timer does not retain the 55h,AAh written
  116.         to it.
  117. action:    Register "CH-2 timer error" to be displayed before
  118.         system boot.
  119.  
  120. B. Channel 2, Channel 1 and Channel 0 delta count test..
  121.  
  122. Procedure..
  123.  
  124. Select channel 2 timer and load with count data 0ffh. Wait for a predefined
  125. time. Read channel 2 timer value and check if the difference between the
  126. data written and read is within the tolerance limit. If the operation is
  127. successful, try the same with count data 0cch.
  128.  
  129. Do the same operations on channel 1 and channel 0 timer in the same
  130. order.
  131.  
  132. Possible errors..
  133.  
  134. error:    Channel 2 timer is not counting at all
  135. action:    Register "CH-2 timer error" to be displayed before
  136.         system boot.
  137.  
  138. error:    Channel 2 timer in not counting properly. The delta
  139.         diference is not within tolerence limit.
  140. action:    Register "CH-2 timer error" to be displayed before
  141.         system boot.
  142.  
  143. error:    Channel 1 timer is not counting at all.
  144. action:    4 beeps and system halted.
  145.  
  146.  
  147.  
  148. error:    Channel 1 timer count is not within tolerence limit.
  149. action:    4 beeps and system halted.
  150.  
  151. error:    Channel 0 timer is not counting at all.
  152. action:    4 beeps and system halted.
  153.  
  154. error:    Channel 0 timer count is not within tolerence limit.
  155. action:    4 beeps and system halted.
  156.  
  157.  
  158. 1.0.6. Refresh test...
  159.  
  160. Procedure..
  161.  
  162. Enable channel 1 (Refresh) timer and channel 0 (System timer). Test refresh
  163. signal changing from low-to-high and high-to-low with time out count of
  164. 0ffffh.
  165.  
  166. Wait for refresh signal to be high. Use counter 1 to count till refresh
  167. becomes low. Use counter 2 to count till refresh becomes high. The
  168. difference between counter 1 and counter 2 should not be more than 6.
  169.  
  170. Possible errors...
  171.  
  172. error:    A time out has occured while testing refresh 
  173.         low-to-high and high-to-low.
  174. action:    1 beep in an infinite loop and system does not proceed
  175.         further.
  176.  
  177. error:    The difference between counter 1 and counter 2 is more
  178.         than 6.
  179. action:    1 beep in an infinite loop and the system does not
  180.         proceed further.
  181.  
  182.  
  183. 1.0.7.Base 64KB RAM test...
  184.  
  185. Procedure...
  186.  
  187. On first 64kb of memory do a Address test, Sequential data write & read
  188. test, Random data write & read test. After all tests are over read the
  189. parity port for any parity error which could have occured during the tests.
  190.  
  191. Possible errors...
  192.  
  193. error:    Error in address line test
  194. action:    3 beeps in an infinite loop and system does not proceed
  195.         further.
  196.  
  197. error::    Error in sequential data write & read test
  198. action:    3 beeps in an infinite loop and system does not proceed
  199.         further.
  200.  
  201.  
  202. error:    Error in random data write & read test.
  203. action:    3 beeps in an infinite loop and system does not proceed
  204.         further.
  205.  
  206. error:    A parity error has occured during the tests.
  207. action:    3 beeps in an infinite loop ands the system does not
  208.         proceed further.
  209.  
  210.  
  211. 1.0.8. Cache memory test...
  212.  
  213.  
  214. A. Check the presence of cache memory
  215.  
  216. Procedure..
  217.  
  218. Disable cache memory
  219.  
  220. Take timing to read 32kb memory 9 times and take the minimum value
  221.  
  222. Enable cache memory
  223.  
  224. Take timing to read 32kb memory 9 times and take the minimum value
  225.  
  226. If the minimum value of timing taken with cache on is greater than
  227. minimum value of timing taken with cache memory off, then indicate in
  228. global data area that cache memory is not present.
  229.  
  230. If cache memory is found present then with cache on test 32kb of memory.
  231.  
  232. Possible errors..
  233.  
  234. error:    Error in testing cache memory
  235. action:    Register "CACHE MEMORY BAD, DO NOT ENABLE CACHE" error
  236.         to be displayed on the screen.
  237.  
  238.  
  239. B. Test 64kb cache memory
  240.  
  241. Test 1st 32kb cache memory
  242.  
  243. Test 2nd 32kb cache memory
  244.  
  245. Possible errors..
  246.  
  247. error:    Error in either 1st or 2nd 32kb cache memory test.
  248. action:    Disable cache and register "CACHE MEMORY BAD, DO NOT
  249.         ENABLE CACHE" error to be displayed on the screen.
  250.  
  251. 1.0.9. CMOS battery, options and checksum check...
  252.  
  253. Read CMOS status register (8dh) and check if battery power is on.
  254.  
  255. Read CMOS diagnostic byte and check if CMOS options set.
  256.  
  257. If CMOS battery power is ok and options set then calculate CMOS
  258. checksum for CMOS registers 10h thru 2dh by a byte addition to a word
  259. result. Read the checksum word stored in registers 2eh and 2fh and
  260. compare it with the calculated checksum.
  261.  
  262. Possible errors..
  263.  
  264. error:    CMOS battery state is low error.
  265. action:    Register "CMOS battery state low" error to be displayed before
  266.         system boot.
  267.  
  268. error:    CMOS system options not set error.
  269. action:    Register "CMOS system option not set" error to be displayed
  270.         before system boot.
  271.  
  272. error:    CMOS checksum mismatch
  273. action:    Register "CMOS checksum error" to be displayed before system
  274.         boot.
  275.  
  276.  
  277. 1.0.10. Display type verification...
  278.  
  279. A. finding out Display type
  280.  
  281. Procedure..
  282.  
  283. Get display switch setting.
  284.  
  285. If display switch mono then segment b000h else segment b800h.
  286.  
  287. Do a display memory sequential write and read test on 4kb of memory.
  288.  
  289. If display memory write and read test ok then do a horizontal and vertical
  290. retrace test.
  291.  
  292. If memory test ok and all retrace test ok then leave the mode of display to
  293. what ever is tested and go to check CMOS display type.
  294.  
  295. If memory test error or any retrace test fails then try the other mode. In
  296. other words if you had color try mono and if you had mono try color.
  297.  
  298. Do a memory test with the new mode.
  299.  
  300. Do horizontal and vertical retrace with the new mode.
  301.  
  302. If memory test ok and all retrace tests ok then leave the mode of display
  303. to whatever is tested and go to check CMOS display type.
  304.  
  305. if memory test error or retrace test error with the new mode then give one
  306. long and 8 short beeps and continue after setting the final mode to mono.
  307.  
  308. Possible errors..
  309.  
  310. error:    memory test error with new mode set
  311. action:    1 long beep and 8 short beeps
  312.  
  313. error:    retrace test failed with new mode
  314. action:    1 long beep and 8 short beeps.
  315.  
  316. B. Check CMOS display type and display switch setting
  317.  
  318. Check the final mode set after finding out display type with the display
  319. switch setting on the motherboard and the display type set in the CMOS by
  320. the user.
  321.  
  322. Possible errors..
  323.  
  324. error:    Display switch setting on mother board is not same as what BIOS
  325.         finds out.
  326. action:    Register "Display switch setting not proper" error to be displayed
  327.         before system boot.
  328.  
  329. error:    Display type set in CMOS is different from what BIOS has found
  330.         out.
  331. action:    Register "CMOS display type mismatch" error to be displayed
  332. before
  333.         system boot.
  334.  
  335.  
  336. 1.0.11. Entering protected mode...
  337.  
  338. Procedure..
  339.  
  340. Get into protected mode using BIOS interrupt 15h function 89h.
  341.  
  342. Possible errors..
  343.  
  344. error:    Processor not in protected mode
  345. action:    Display "8042 GATE-A20 ERROR, SYSTEM HALTED"
  346.  
  347. error:    Virtual mode exception error
  348. action:    7 beeps in an infinite loop. System does not proceed
  349.         further.
  350.  
  351. 1.0.12. Address line test and memory size finding..
  352.  
  353. Procedure..
  354.  
  355. Write a test pattern at 0:0h
  356.  
  357. Starting from bottom of the conventional memory space (640kb boundary) do
  358. a address line test 64kb at a time and come down till there is a segment
  359. where address line error is not found. That will be the bottom of the
  360. conventional memory.
  361.  
  362. Now read back the test pattern at 0:0h. This should be same as the test
  363. data written at 0:0h before the test was performed. If the test pattern at 0:0h is overwritten then there is a address line error because while doing
  364. address line test, the addresses are generated in such a way that only one
  365. bit is set in the address line everytime. If there is a failure in that bit of
  366. address line then the address generated will be 0. So the data written at
  367. that address will actually be written at 0:0h.
  368.  
  369. Write a test pattern at 0:0h.
  370.  
  371. Starting from the bottom of the Extended memory (16MB boundary) do a
  372. address line test till there is a segment where address line error is not
  373. found. That will be the bottom of extended memory.
  374.  
  375. Now read back the data at 0:0h. This should be same as the test data
  376. written at 0:0h before the test is peformed
  377.  
  378. Possible errors..
  379.  
  380. error:    Test data at 0:0h is destroyed while trying to find out
  381.         the conventional memory size.
  382. action:    3 beeps in a loop and system does not proceed any
  383.         further.
  384.  
  385. error:    Test data at 0:0h is destroyed while trying to find out
  386.         the extended memory size.
  387. action:    3 beeps in an infinite loop and the system does not
  388.         proceed further.
  389.  
  390.  
  391. 1.0.13. Conventional and Extended memory test..
  392.  
  393. Procedure..
  394.  
  395. Clear all the conventional memory 64kb at a time by filling it with 0.
  396.  
  397. Clear all Extended memory 64kb at a time by filling if with 0.
  398.  
  399.  
  400. Starting from 2nd 64kb in conventional memory space do the following 64kb
  401. at a time for the size of conventional memory found in step 13:-
  402.         
  403. IF <ESC> is pressed
  404.  
  405.     skip all test 
  406.  
  407.     Fill the 64kb memory with 0.
  408.  
  409.     Go back to real mode
  410.  
  411.     Display memory size tested so far
  412.  
  413.     Go back to protected mode
  414.  
  415. ELSE
  416.  
  417.     Do a Sequential Write and Read test
  418.  
  419.     Do a Random Write and Read test
  420.  
  421.  
  422.     Check if Parity error is registered during any of the above
  423.     2 tests.
  424.  
  425.     Fill memory tested with 0
  426.  
  427.     Go back to real mode
  428.  
  429.     Display memory size tested so far 
  430.  
  431.     Go back to protected mode
  432.  
  433. Starting from 1st 64kb in Extended memory space do the following 64kb at
  434. a time for the size of extended memory found in step 13:-
  435.  
  436. IF <ESC> is pressed
  437.  
  438.     Skip all test 
  439.  
  440.     Fill the memory with 0.
  441.  
  442.     Go back to real mode
  443.  
  444.     Display memory size tested so far
  445.  
  446.     Go back to protected mode
  447.  
  448.  
  449. ELSE
  450.  
  451.     Do a Sequential Write and Read test
  452.  
  453.     Do a Random Write and Read test
  454.  
  455.     Check if parity error is registered during any of the above
  456.     2 tests.
  457.  
  458.     Fill memory tested with 0
  459.  
  460.     Get into real mode
  461.  
  462.     Display memory size tested so far 
  463.  
  464.     Go back to protected mode
  465.  
  466. Possible errors...
  467.  
  468. error:    Memory Write and Read test error
  469. action:    1 long beep and 3 short beeps produced in the speaker.
  470.         The memory size is trimmed to what ever was found good.
  471.  
  472.  
  473. error:    Parity error registered during Sequential and Random
  474.         test on any 64kb segment.
  475. action:    1 long beep and 3 short beeps produced in the speaker.
  476.         The memory size is trimmed to what ever was found good.
  477.  
  478. error:    Virtual mode exception error has occured
  479. action:    7 beeps in an infinite loop and system does not proceed
  480.         further.
  481.  
  482.  
  483. 1.0.14. DMA Controller test
  484.  
  485. 4 different patterns are written into and read back from DMA page
  486. registers 80h thru 8fh. The data read back should be same as the data
  487. written. The data patterns used are aa55h,55aah,cc0fh,0000h.
  488.  
  489. The same patterns are then written into, read back from DMA unit 1
  490. registers 00 thru 07. The data read back should be same as the data
  491. written.
  492.  
  493. The same patterns are them written into, read back from DMA unit 2
  494. registers C0h thru C7h. The data read back should be same as the data
  495. written.
  496.  
  497. Possible errors...
  498.  
  499. error:    Any one of the DMA page registers did not retain the
  500.         data.
  501. action:    "DMA ERROR, SYSTEM HALTED"
  502.  
  503. error:    Any one of the DMA unit 1 registers did not retain the
  504.         data.
  505. action:    "DMA #1 ERROR, SYSTEM HALTED"
  506.  
  507. error:    Any one of the DMA unit 2 registers did not ratain the
  508.         data.
  509. action:    "DMA #2 ERROR, SYSTEM HALTED"
  510.  
  511.  
  512. 1.0.15. Keyboard test
  513.  
  514. Procedure..
  515.  
  516. Output keyboard self test command 0ffh. The keyboard should return 0fah
  517. and 0aah.
  518.  
  519. If the data returned is 0fah and 0aah then check if any key is stuck on
  520. the keyboard. This is done by enabling keyboard enable bit, inhibit bit, sys
  521. bit, output buffer full bit and then checking for output buffer full bit going
  522. low.
  523.  
  524.  
  525.  
  526. If any error occured during the above two tests, keyboard interface test is
  527. performed. This is done by writing command 0abh to keyboard controller
  528. and reading the response. The response should be 00h.
  529.  
  530. Possible errors..
  531.  
  532. error:    Keyboard self test command failed but the keyboard
  533.         interface test command was successful.
  534. action:    Register soft error "Keyboard error" to be displayed
  535.         before system boot.
  536.  
  537. error:    Keyboard self test command passed, keyboard was found
  538.         to be stuck and keyboard interface command passed.
  539. action:    Register soft error "Keyboard error" to be displayed
  540.         before system boot.
  541.  
  542. error:    Keyboard self test command failed or keyboard was found
  543.         stuck and the keyboard interface command failed.
  544. action:    Register "KB/Interface error" to be displayed before
  545.         system boot.
  546.  
  547. 1.0.16. System configuration verification and setup
  548.  
  549. A. Floppy disk setup..
  550.  
  551. Procedure..
  552.  
  553. Initialize floppy global data area.
  554.  
  555. reset floppy controller.
  556.  
  557. For floppy drive 0 and 1 try to find out the presence of the drive and then
  558. sense the drive type in the following manner:-
  559.  
  560.     Seek to track 48
  561.  
  562.     Seek backwards till track 0
  563.  
  564.     If seek to track 0 is not successful then it is a 40 track
  565.     drive which is 360kb. So set global as 360kb disk type.
  566.  
  567.     If seek to track 0 is successful, it is a 80 track drive so
  568.     check CMOS for type of drive selected through the SETUP
  569.     program.
  570.  
  571.     For 720kb drive set 720kb disk type in global.
  572.  
  573.     If 1.2mb or 1.44mb in CMOS, then set 2 or 7 respectively in
  574.     the global which means that media has to be established for
  575.     these drives every time a new disk is put in. This is
  576.     necessary because a 1.2mb drive can take 1.2mb or 360kb disk
  577.     and a 1.44mb drive can take either 720kb or 1.44mb disk.
  578.  
  579.  
  580.  
  581. Possible errors...
  582.  
  583. error:    Reset floppy controller failure
  584. action:    Register "FDD controller failure" error to be displayed
  585.         before system boot.
  586.  
  587. B. Hard disk Setup
  588.  
  589. Procedure..
  590.  
  591. Reset hard disk controller.
  592.  
  593. If CMOS bad or no drive type set, skip hard disk check otherwise do hard
  594. disk tests in following manner:-
  595.  
  596. Redirect Int 13h to Int 40h for floppy and point Int 13h to hard disk
  597. routines.
  598.  
  599. Depending upon the CMOS Drive type value, point Int 41h and Int 46h
  600. vectors to ROM drive type parameters for drive C and D respectively.
  601.  
  602. Initialize the global data area for hard disks.
  603.  
  604. Issue controller diagnostics command for the hard disk controller.
  605.  
  606. Set parameters from drive type table for drive 0 and recalibrate on drive 0
  607. if CMOS type is set for drive 0.
  608.  
  609. Set parameters from drive type table for drive 1 and recalibrate on drive 1
  610. if CMOS type is set for for drive 1. 
  611.  
  612. For drive 0, if CMOS type is set, do verify on each sector in the last
  613. track. At least one of the sectors in the last track should verify ok.
  614.  
  615. For drive 1, if CMOS isset, do verify on each sector in the last track. At
  616. least one of the sectors in the last track should verify ok.
  617.  
  618. Possible errors..
  619.  
  620. error:    Hard disk controller diagnostics failed
  621. action:    Register "HDD controller error" to be displayed before
  622.         system boot.
  623.  
  624. error:    Recalibrate on drive 0 failed.
  625. action:    Register "C:Drive failure" error to be displayed before
  626.         system boot.
  627.  
  628. error::    Recalibrate on drive 1 failed.
  629. action:    Register "D:Drive failure" error to be displayed before
  630.         system boot.
  631.  
  632.  
  633.  
  634. error:    None of the sectors in last track on drive 0 verified
  635.         ok.
  636. action:    Register "C:Drive error" error to be displayed before
  637.         system boot.
  638.  
  639. error:    None of the sectors in last track on drive 1 verified
  640.         ok.
  641. action:    Register "D:Drive error" error to be displayed before
  642.         system boot.
  643.  
  644.  
  645. C. Memory size verification
  646.  
  647. Procedure...
  648.  
  649. If CMOS battery state is ok and CMOS checksum is ok then do the
  650. following:-
  651.  
  652. Check Conventional memory size in CMOS with actual memory size found
  653. out by BIOS.
  654.  
  655. Check Extended memory size in CMOS with actual extended memory size
  656. found by BIOS.
  657.  
  658. Possible errors..
  659.  
  660. error::    Actual conventional memory size found by BIOS is not
  661.         same as memory size stored in CMOS.
  662. action:    Register "CMOS memory size mismatch" error to be
  663.         displayed before system boot.
  664.  
  665. error:    Actual extended memory size found by BIOS is different
  666.         from memory size stored in CMOS.
  667. action:    Register "CMOS memory size mismatch" error to be
  668.         displayed before system boot.
  669.  
  670.  
  671. D. Optional ROM control
  672.  
  673. Procedure..
  674.  
  675. Start from segment C800h segment and continue with an increment of 80h
  676. till E000h segment with the following operation:-
  677.  
  678. Check if word at offset 0 is 0aa55h.
  679.  
  680. If word at offset 0 is 0aa55h then do the following:-
  681.  
  682. Take the size of the ROM from offset 2. The size should be # of 512 bytes
  683. in the optional ROM. Now calculate the checksum of the ROM by adding all
  684. the bytes. The checksum should be 0. If the checksum is 0 then give
  685. control to the optional ROM at offset 3 
  686. by a FAR CALL.
  687.  
  688. E. Initialize Timer data area
  689.  
  690. Procedure..
  691.  
  692. Check if CMOS battery state ok and CMOS checksum ok. If both of them
  693. are ok then do the following:-
  694.  
  695. Read real time clock through BIOS interrupt routine 1Ah. Compare the
  696. hour, minute and second BCD values to find if they are within limit. Hour
  697. should be <=24, Minute<=60 and second<=60. If they are within limit then
  698. change them from BCD to Binary value and in terms 1/18th of a second.
  699. Save them in timer data area which is 2 words and is used by the timer
  700. routine to update the count in every 1/18th of a second.
  701.  
  702. Possible errors..
  703.  
  704. error:    Error returned by int 1Ah function.
  705. action:    Register "CMOS time & date not set" to be displayed
  706.         before system boot.
  707.  
  708. error:    Hour, minute and seconds not within limit.
  709. action:    Register "CMOS time & date not set" error to be
  710.         displayed before system boot.
  711.  
  712.  
  713. E. Setup Printer and RS232 Ports
  714.  
  715. Procedure..
  716.  
  717. Check for presence of printer ports 03bch, 0378h, 0278h by a port pattern
  718. test. In the port pattern test write values 0aa55h, 55aah, cc00h,0000h to
  719. these ports in these order and read them back after writing to check if
  720. they retain the values. For the ports that retain the values, add them to
  721. the system data area starting at 40h:8.
  722.  
  723. Check for presence of RS232 ports 03f8h, 02f8h, 03e8h, 02e8h in the same
  724. way as above and add them to the system data area at 40h:0.
  725.  
  726. F. Check for Keyboard lock
  727.  
  728. Procedure..
  729.  
  730. Read keyboard status port and check the keyboard lock bit.
  731.  
  732. Possible errors..
  733.  
  734. error:    Keyboard is locked
  735. action:    Register "Keyboard is locked" error to be displayed
  736.         before system boot.
  737.  
  738. G. Display all error messages
  739.  
  740. H. System ROM control
  741.  
  742. Procedure..
  743.  
  744. Check for System ROM at segment e000h in following manner:-
  745.  
  746. Check if at offset 0 the word value is 0aa55h. If the value is 0aa55h then
  747. calculate a byte checksum for 64kb by adding all bytes. The checksum
  748. should be 0. If the checksum is zero then give control to the optional ROM
  749. at offset 3.
  750.  
  751.  
  752.  
  753.  
  754. 2.0 Classification of error messages..
  755.  
  756. The error messages can be classified into 4 diferent categories
  757.  
  758.         Fatal errors through beeps
  759.     
  760.         Fatal errors through display
  761.  
  762.         Non fatal errors through beeps
  763.  
  764.         Non fatal errors through display
  765.  
  766. 2.1 Fatal errors through beeps..
  767.  
  768. The fatal errors through beeps are conveyed through a number of beeps in
  769. an infinite process and there is enough time gap between tow subsequent
  770. sets of error beeps to calculate the number in each set.
  771.  
  772. 2.1.1 One beep (DRAM Refresh failure)
  773.  
  774. Occurrence..
  775.  
  776.     Refresh test
  777.  
  778. 2.1.2 Three beeps (Base 64kb RAM failure)
  779.  
  780. Occurrence..
  781.  
  782.     Base 64kb RAM test
  783.  
  784.     Address test and memory size finding
  785.  
  786. 2.1.3 Four beeps (System timer failure)
  787.  
  788. Occurrence..
  789.  
  790.     Channel 1 timer test
  791.  
  792.     Channel 0 timer test
  793.  
  794. 2.1.4 Five beeps (Processor failure)
  795.  
  796. Occurrence..
  797.  
  798.     Processor register test
  799.  
  800. 2.1.5 Six beeps (Keyboard controller Gate A20 error)
  801.  
  802. Occurrence..
  803.  
  804.     Keyboard controller test
  805.  
  806.  
  807. 2.1.6 Seven beeps (Virtual mode exception error)
  808.  
  809. Occurrence..
  810.  
  811.     Getting into protected mode
  812.  
  813.     Conventional and Extended memory test
  814.  
  815.  
  816. 2.1.7 Nine beeps (ROM BIOS Checksum failure)
  817.  
  818. Occurrence..
  819.  
  820.     ROM BIOS Checksum check
  821.  
  822.  
  823. 2.2 Fatal errors through display..
  824.  
  825. When these errors are displayed the screen is cleared and after the error
  826. message display is also followed by a line saying "SYSTEM HALTED"
  827.  
  828. 2.2.1 CMOS INOPERATIONAL
  829.  
  830. Occurrence..
  831.  
  832.     CMOS Shutdown register test
  833.  
  834. 2.2.2 8042 GATE-A20 ERROR
  835.  
  836. Occurrence..
  837.  
  838.     Getting into protected mode
  839.  
  840. 2.2.3 INVALID SWITCH MEMORY FAILURE
  841.  
  842. 2.2.4 DMA ERROR
  843.  
  844. Occurrence.. 
  845.  
  846.     DMA Controller page register test
  847.  
  848. 2.2.5 DMA #1 ERROR
  849.  
  850. Occurrence..
  851.     
  852.     DMA Unit 1 register test
  853.  
  854. 2.2.6 DMA #2 ERROR
  855.  
  856. Occurrence..
  857.  
  858.     DMA Unit 2 register test
  859.  
  860.  
  861. 2.3 Non fatal errors through beeps..
  862.  
  863. These errors are displayed as one long beep following by a number of short
  864. beeps and the system proceeds normally.
  865.  
  866. 2.3.1 One long and 3 short beeps
  867.  
  868. Occurrence..
  869.  
  870.     Conventional and Extended memory test
  871.  
  872. 2.3.2 One long and eight short beeps
  873.  
  874. Occurrence..
  875.  
  876.     Display RAM test and display vertical and horizontal retrace test.
  877.  
  878. 2.4 Non fatal errors through display..
  879.  
  880. These types of errors are classified into 2 categories.
  881.  
  882.     Ones that wait for F1 key and give the option to run SETUP
  883.  
  884.     Ones that wait for F1 key but do not give option to run SETUP
  885.  
  886. 2.4.1 Errors waiting fot F1 key and giving option to run SETUP
  887.  
  888. 2.4.1.1 CMOS battery state low
  889.  
  890. Ouucrrence..
  891.  
  892.     CMOS battery, options set and checksum test
  893.  
  894. 2.4.1.2 CMOS system options not set
  895.  
  896. Occurrence..
  897.  
  898.     CMOS battery, options set and checksum test
  899.  
  900. 2.4.1.3 CMOS ckecksum failure
  901.  
  902. Occurrence..
  903.  
  904.     CMOS battery, options set and checksum test
  905.  
  906. 2.4.1.4 CMOS display type mismatch
  907.  
  908. Occurrence..
  909.  
  910.     Display type verification
  911.  
  912. 2.4.1.5 CMOS memory size mismatch
  913.  
  914. Occurrence..
  915.  
  916.     System Configuration verification and setup (Memory size verification)
  917.  
  918. 2.4.1.6 CMOS time & date not set
  919.  
  920. Occurrence..
  921.  
  922.     System configuration verification and setup (Init timer data)
  923.  
  924.  
  925. 2.4.1.7 C:Drive failure
  926.  
  927. Occurrence..
  928.  
  929.     System configuration verification and setup (Hard disk setup)
  930.  
  931. 2.4.2 Errors waiting for F1 key and not giving the option to run SETUP
  932.  
  933. 2.4.2.1 CH-2 timer error
  934.  
  935. Occurrence..
  936.  
  937.     Channel 2,1,0 timer test
  938.  
  939. 2.4.2.2 Keyboard error
  940.  
  941. Occurrence..
  942.  
  943.     Keyboard test
  944.  
  945. 2.4.2.3 KB/Interface error
  946.  
  947. Occurrence..
  948.  
  949.     Keyboard test
  950.  
  951. 2.4.2.4 Display switch setting not proper
  952.  
  953. Occurrence..
  954.  
  955.     Display type verification
  956.  
  957.  
  958. 2.4.2.5 Keyboard is locked ... Unlock it
  959.  
  960. Occurrence..
  961.  
  962.     System configuration verification and setup (Keyboard lock check)
  963.  
  964. 2.4.2.6 FDD controller error
  965.  
  966. Occurrence..
  967.  
  968.     System configuration verification and setup (floppy disk setup)
  969.  
  970. 2.4.2.7 HDD controller failure
  971.  
  972. Occurrence..
  973.  
  974.     System configuration verification and setup (Hard disk setup)
  975.  
  976. 2.4.2.8 C:Drive error
  977.  
  978. Occurrence..
  979.  
  980.     System configuration verification and setup (Hard disk setup)
  981.  
  982.  
  983. 2.4.2.9 D:Drive error
  984.  
  985. Occurrence..
  986.  
  987.     System configuration verification and setup (Hard disk setup)
  988.  
  989.  
  990. 2.4.2.10 D:Drive failure
  991.  
  992. Occurrence..
  993.  
  994.     System configuration verification and setup (Hard disk setup)
  995.  
  996.  
  997. Appendix A
  998.  
  999.  
  1000. Address line test procedure
  1001.  
  1002.  
  1003. For the 64kb of memory on test, write and then read data patterns 0ffh
  1004. and 00h at addresses 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096,
  1005. 8192, 16384, 32768. The data read back should be same as that written.
  1006.  
  1007. Sequential memory Write and Read test
  1008.  
  1009. For the 64kb of memory on test, use test patterns 8080h, 5555h, 3333h,
  1010. 0f0fh in the same order.
  1011.  
  1012. Take one pattern and write it on the entire 64kb space one word at a time.
  1013. Then compare the 64k space one word at a time with the value written. If
  1014. any word does not retain the value then return error.
  1015.  
  1016.  
  1017. Random memory Write and Read test
  1018.  
  1019. Use a random number generator which generates 16k of random numbers as
  1020. memory addresses and returns a seed between 0 to ffh associated with each
  1021. random addresses generated.
  1022.  
  1023. Use the random number generator again and read the data from the random
  1024. address.  The data read back should be same as the seed returned by the
  1025. random number generator. In short, the BIOS checks wheather the data
  1026. written in 16k random addresses are retained in those memory locations.
  1027.  
  1028. The random number generator procedure is written in such a way that it
  1029. generates the same sequence of random numbers in the same order every
  1030. time it is called and it also returns a unique seed associated with each
  1031. random number.
  1032.  
  1033.  
  1034.  
  1035. Appendix B
  1036.  
  1037. CMOS RAM USAGE IN AMI MARK II AT BIOS
  1038.  
  1039. -------------------------------------------------------------------------
  1040. Address        Description
  1041.  
  1042. -------------------------------------------------------------------------
  1043. 00-0D    *Real-time clock information
  1044. 0E        *Diagnostics status byte
  1045. 0F        *Shutdown status byte
  1046. 10        Diskett drive type byte - drives A and B
  1047. 11        Reserved
  1048. 12        Fixed disk type byte - drives C and D (1 - 14)
  1049. 13        Reserved
  1050. 14        Equipment byte
  1051. 15        Base memory byte LOW
  1052. 16        Base memory byte HIGH
  1053. 17        Expansion memory byte LOW
  1054. 18        Expansion memory byte HIGH
  1055. 19        Extended fixed disk type - drive C (16 - 255)
  1056. 1A        Extended fixed disk type - drive D (16 - 255)
  1057. 1B-2C!!    User defined drive type 
  1058. 2D        Reserved
  1059. 2E-2F    2 - byte CMOS Checksum
  1060. 30        *Expansion memory size LOW
  1061. 31        *Expansion memory size HIGH
  1062. 32        *Date century byte
  1063. 33        *Information flags (set during power on)
  1064. 34-36    Reserved
  1065. 37 !!    Video and Keyboard installation information
  1066. 38 !!    Video shadow and memory information
  1067. 39-3A!!    Segment value for scratch memory used by BIOS for Load all
  1068.         translation.
  1069. 3B-3F    Reserved
  1070. ------------------------------------------------------------------------
  1071.  
  1072. *These bytes are not included in the checksum calculation and are not part
  1073. of the configuration record.
  1074.  
  1075. !! These are extra bytes used by AMI BIOS.
  1076.  
  1077. Bytes 1B - 2C (Is used by AMI BIOS released after March 1989)
  1078. _____________________________________________
  1079.  
  1080. These bytes will store user defined drive types in following format.
  1081.  
  1082. Drive C User defined type
  1083.  
  1084. 1B,1C        Number of cylinders
  1085. 1D            Number of heads
  1086.  
  1087. 1E,1F        Write precom
  1088.  
  1089. 20            Control byte
  1090. 21,22        Landing zone
  1091. 23            Number of sectors
  1092.  
  1093. Drive D User defined type
  1094.  
  1095. 24,25        Number of cylinders
  1096. 26            Number of heads
  1097. 27,28        Write precom
  1098. 29            Control byte
  1099. 2A,2B        Landing zone
  1100. 2C            Number of sectors
  1101.  
  1102.  
  1103. Byte 37 
  1104. _____
  1105.  
  1106.  
  1107. Bit 0        This bit has meaning only in BIOS released after March
  1108. 1989.
  1109.             1=Test keyboard
  1110.             0=Do not test keyboard
  1111.  
  1112. Bit 1        This bit has meaning only in BIOS released after March
  1113. 1989.
  1114.             1=Test Video
  1115.             0=Don not test Video
  1116.  
  1117. Bit 2        Current status of keyboard controller pin 23.
  1118.  
  1119. Bit 3        Current Status of Keyboard controller pin 24.
  1120.  
  1121. Bit 4-7        Not used
  1122.  
  1123. Byte 38
  1124. _____
  1125.  
  1126. Bit 0-2        Not used
  1127.  
  1128. Bit 3        1="INS" key has been pressed
  1129.             0="INS" key not pressed
  1130.  
  1131. Bit 4        1=Weitek co-processor present
  1132.             0=Weitek co-processor absent
  1133.  
  1134. Bit 5        1=Enable Video shadow
  1135.             0=Disable video shadow
  1136.  
  1137. Bit 6        1=Relocate 256k memory
  1138.             0=Do not relocate 256k memory
  1139.  
  1140. Bit 7        1=32-bit memory card installed
  1141.             0=32-bit memory card not installed
  1142.             
  1143.             
  1144.  
  1145. Byte 39-3A 
  1146. ________
  1147.  
  1148. These bytes are used to save the segment value of the memory BIOS is
  1149. going to use for Load all function translation. For MARK II AT Board this
  1150. actually points to BIOS area because BIOS Shadow RAM is enabled.
  1151.  
  1152.